package scsc.pm;

import java.util.*;

import scsc.pub.db.*;
import scsc.pub.tools.*;
import java.util.ArrayList;
import scsc.web.xzgl.building.report.data.NohBuildingReportData;
import scsc.pub.exception.*;

public class NohBuildingReportPm {
  private static Logger logger = Logger.getLogger(NohBuildingReportPm.class);
  public NohBuildingReportPm() {
  }

  public Double selectNohBuildingReport(DBManage dbmanage, NohBuildingReportData formdata) {
	 String selCom=formdata.getCom();
	String sqlStr="select sum(nb.buildArea) as sum";
	sqlStr+=" from scsc.pub.data.NohouseBuilding as nb where 1=1";
	if (selCom!=null && selCom.length()>0)
		sqlStr+=" and nb.com like '%" + selCom + "%'";
	List result = dbmanage.sqlQuery(sqlStr);
	if (result!=null && result.size()==1){
		Object a=(Object)(result.get(0));
		Double sum=(Double)a;
		return sum;
		
	}else
		return new Double(0.0);

  }

    
}
